#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 5000;
const int M = 1e9 + 7;

int t, n;
string s;

map<char, char> m;

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);
    m['U'] = 'D';
    m['D'] = 'U';
    m['L'] = 'L';
    m['R'] = 'R';

    cin >> t;
    while (t--)
    {
        cin >> n >> s;
        string res;
        for (int i = 0; i < n; i++)
        {
            res += m[s[i]];
        }
        cout << res << endl;
    }
    return 0;
}